package builder;

import java.util.Vector;

import model.Action;

public class MediatorBuilder extends AbstractPatternBuilder {
	
	private String mediator = "Mediator";
	private String concreteMediator = "ConcreteMediator";
	private String colleage = "Colleague";
	private String concreteColleague1 = "ConcreteColleague1";
	private String concreteColleague2 = "ConcreteColleague2";
		
	public MediatorBuilder() {
		super();
	}

	@Override
	public Vector<Action> buildPattern() {
		
		this.buildClass(concreteMediator);
		this.buildClass(concreteColleague1);
		this.buildClass(concreteColleague2);
		
		
		this.buildAbstractClass(mediator);
		this.buildAbstractClass(colleage);
		
		this.buildGeneralization(concreteMediator, mediator);
		this.buildGeneralization(concreteColleague1, colleage);
		this.buildGeneralization(concreteColleague2, colleage);
		
		this.buildAssociation(colleage, mediator);
		this.buildAssociation(concreteMediator, concreteColleague1);
		this.buildAssociation(concreteMediator, concreteColleague2);
		
		return patternActions;
	}

	@Override
	public void changeNames() {
		
		mediator = names.get(0);
		concreteMediator = names.get(1);
		colleage = names.get(2);
		concreteColleague1 = names.get(3);
		concreteColleague2 = names.get(4);
		
	}
	
	@Override
	public int cantUMLElements() {
		return 5;
	}

}
